
<template>
  <el-container style="height:100%; border: 1px solid #eee;width: 100%;">
    <el-header style="height:70px;width: 100%;">
      <v-head @setCollapse="setCollapse" />
    </el-header>
		
    <el-container style="width: 100%;height: 100%;">
      <el-aside
        class=""
        :width="collapse?'auto':'auto'"
        style="background-color: rgb(238, 241, 246);height: 100%;"
      >
        <v-sidebar
          :collapse="collapse"
          style="height: 100%;"
        />
      </el-aside>
	
      <el-main style="height: 100%;">
        <v-tags />
        <transition
          name="move"
          mode="out-in"
          style="height: 100%;"
        >
          <!-- 缓存页面 防止重复渲染DOM -->
          <keep-alive :include="tagsList">
            <router-view />
          </keep-alive>
        </transition>
      </el-main> 
    </el-container>
  </el-container>
</template>
<script>
    import vHead from '../../components/public/header.vue';
    import vSidebar from '../../components/public/sidebar.vue';
    import vTags from '../../components/public/tags.vue';
    // import bus from './bus';
    export default {
        data(){
            return {
                tagsList: [],
                collapse: true
            }
        },
        components:{
            vHead, vSidebar, vTags
        },
        created(){

        },methods:{
			setCollapse(e){
				// console.log("父组件"+e)
				
				this.collapse=!this.collapse;
			}
		}
    }
</script>
<style>

.el-header, .el-footer {
    background-color: #B3C0D1;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
  }
  
  .el-main {
    background-color: #E9EEF3;
    color: #333;
    text-align: center;
  }
  
</style>
